-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move counters inside condenser. #1548
Conversation
} | ||
for (kind, id) in symbols { | ||
let counter = counters.symbol_counters.get_mut(&kind).unwrap(); | ||
*counter = std::cmp::max(*counter, id + 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry, this is actually wrong. Will fix.
}) | ||
.max() | ||
.unwrap_or_default(); | ||
let counters = Counters::with_existing(symbols.values().map(|(sym, _)| sym), None, None); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use .keys()
instead of .values().map(|(sym, _)| sym)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, not. The values are pairs. It would have worked to replace items().map(...
, but not values().map(...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry. I may be still sleepy.
No description provided.